<template>
  <div id="app">
    <div class="cont">
      <img v-lazy="imgname" :src="imgname" alt="" />
      <div class="right">
        <h3>{{ title }}</h3>
        <div class="radio">
          <span class="r1" v-if="label.split('，')[0]">{{
            label.split('，')[0]
          }}</span>
          <span class="r2" v-if="label.split('，')[1]">{{
            label.split('，')[1]
          }}</span>
          <span class="r3" v-if="label.split('，')[2]">{{
            label.split('，')[2]
          }}</span>
        </div>
        <div class="button">
          <p>￥{{ price }}</p>
        </div>
      </div>
    </div>

    <hr />
  </div>
</template>

<script>
export default {
  props: ['imgname', 'label', 'price', 'title'],
}
</script>

<style lang="scss" scoped>
#app {
  width: 328px;
  height: 112px;
  margin: auto;
  margin-top: 20px;
  position: relative;
}
#app .cont {
  display: flex;
  width: 328px;
  margin: 0 0 20px 0;
  font-size: 15px;
}
#app .cont h3 {
  color: black;
}
#app .cont .right {
  margin-left: 10px;
}
.cont img {
  width: 90px;
  height: 90px;
  border-radius: 10px;
}
.cont h3 {
  margin: 0;
  padding: 0;
}
.cont .radio {
  margin-top: 5px;
  text-align: center;
}
.cont .radio .r1 {
  display: inline-block;
  width: 65px;
  height: 20px;
  background-color: #ebfff7;
  border-radius: 10px;
  color: #54dabb;
}
.cont .radio .r2 {
  display: inline-block;
  width: 65px;
  height: 20px;
  background-color: #fff1d6;
  border-radius: 10px;
  color: #ffb72c;
  margin: 0 10px;
}
.cont .radio .r3 {
  display: inline-block;
  width: 65px;
  height: 20px;
  background-color: #ffdfdf;
  border-radius: 10px;
  color: #ff8e8e;
}
.cont .button {
  display: flex;
  font-size: 18px;
  font-weight: 600;
  justify-content: space-between;
  color: #ec3a4e;
}
.cont .button p {
}
.cont .button .bg {
  width: 35px;
  height: 35px;
  background-color: #fdebed;
  border-radius: 50%;
  margin-top: 15px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 10px;
  top: 50px;
}
.cont .button .btn {
  display: inline-block;
  font-size: 25px;
  color: #cbc9c9;
}

hr {
  width: 90%;
  height: 0;
  color: #f2f5fa;
  border: 0.02778rem solid;
  border-color: #f2f5fa;
}
</style>
